import request from '@/utils/request'

export function getDreams() {
  return request({
    url: '/dreams/api/v1/get_dreams',
    method: 'get'
  })
}

export function getDreamById(id) {
  return request({
    url: '/dreams/api/v1/get_dream_by_id',
    method: 'get',
    params: { id }
  })
}

export function getBriefDream(){
  return request({
    url: '/dreams/api/v1/get_brief_dream',
    method: 'get'
  })
}

export function updateDreamById(data) {
  return request({
    url: '/dreams/api/v1/update_dream_by_id',
    method: 'post',
    data
  })
}

export function createDream(data) {
  return request({
    url: '/dreams/api/v1/create_dream',
    method: 'post',
    data
  })
}

export function deleteDreamById(data){
  return request({
    url: '/dreams/api/v1/delete_dream_by_id',
    method: 'post',
    data
  })
}
